<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

</body>
<script>
  var keke = {
    name: 'keke',
    type: 'Alaska',
    bark: function () {
      console.log("汪汪汪");
    }
  }

  for(var k in keke){
    console.log(k);
    console.log(keke[k]);
  }

</script>
</html>